#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
数据库结构查看器启动脚本
"""

import sys
import os

# 添加父目录到路径
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if parent_dir not in sys.path:
    sys.path.insert(0, parent_dir)

def main():
    print("🔍 数据库结构查看工具")
    print("=" * 50)
    print("选择查看模式:")
    print("1. 交互式查看器 (类似 MySQL 命令行)")
    print("2. 快速结构查看器 (一键生成报告)")
    print()
    
    try:
        choice = input("请选择 (1 或 2): ").strip()
        
        if choice == '1':
            print("\n🚀 启动交互式查看器...")
            from database_inspector import main as inspector_main
            inspector_main()
        elif choice == '2':
            print("\n🚀 启动快速查看器...")
            from quick_schema_viewer import main as viewer_main
            viewer_main()
        else:
            print("❌ 无效选择")
            
    except Exception as e:
        print(f"❌ 启动失败: {e}")

if __name__ == "__main__":
    main()
